#pragma once

#include <GL/glut.h>
#include <math.h>
#include "..\vector3D.h"

#define FOVY 45
#define ASPECT_RATIO 1.33f

class CFrustum
{
private:
	GLfloat angle, farDist, nearDist, heightNear, heightFar, widthNear, widthFar;

	Vector3D farC, nearC;
	Vector3D fPosition, fDirection, fUp;
	Vector3D up, right;

	Vector3D ftl, ftr, fbl, fbr;
	Vector3D ntl, ntr, nbl, nbr;
	Vector3D farV, nearV, leftV, rightV, topV, btmV;

public:
	CFrustum(void);
	~CFrustum(void);

	//Update the frustum;
	void Update(void);
	//Draw the frustum
	void Draw(void);
	//Perform containment check for a position with respect to the Frustum
	bool ContainmentCheck(const Vector3D position);
};
